home *** CD-ROM | disk | FTP | other *** search
PiXCL source | 1996-06-14 | 4.5 KB | 169 lines |
- Initialize:
- UseCoordinates(PIXEL)
- Set WinTitle$ = "Test Context Sensitive Help"
- WinGetActive(OldWin$)
- WinTitle(OldWin$,WinTitle$)
- WinLocate(WinTitle$,100,100,600,250,Res)
- WinShow(WinTitle$,NOTOPMOST,Res)
- DirGet(SourceDir$)
- UseBackGround(TRANSPARENT,192,192,192)
- DrawBackGround
- Set Context$ = ""
- InfoMenu(REMOVE)
- WaitInput(100)
- SetMenu("&File",IGNORE,
- "E&xit!",Run_Leave,
- ENDPOPUP,
- "&HLP File",Get_Hlp_File,
- ENDPOPUP,
- "&Select Context",IGNORE,
- "&CONTEXT ID",Get_Hlp_File_1,
- "&TOPIC_name",Get_Hlp_File_2,
- ENDPOPUP,
- "&MAP file",View_MAP,
- ENDPOPUP,
- "&Help",IGNORE,
- "&Concept",Concept,
- SEPARATOR,
- "&About",About,
- ENDPOPUP)
-
- Wait_for_Input:
- WaitInput()
-
- Run_Leave:
- End
-
- Get_Hlp_File:
- DrawBackGround
- Set Filter$ = "Help Files(*.hlp),*.hlp"
- Set Caption$ = "Select the Help file to run"
- Set InitDir$ = SourceDir$
- Set InitFile$ = "*.hlp"
- Set HLPfile$ = ""
- FileGet(Filter$,InitFile$,InitDir$,Caption$,CHANGEDIR,HLPfile$)
- If HLPfile$ = "" Then Goto Wait_for_Input
- Set Select$ = "Selected File " + HLPfile$
- UseFont("Arial",9,21,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
- DrawText(11,11,Select$)
- UseFont("Arial",9,21,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
- DrawText(10,10,Select$)
- Goto Wait_for_Input
-
-
-
- Get_Hlp_File_1:
- If HLPfile$ <> "" Then Goto Get_Hlp_File_1a
- MessageBox(OK,1,EXCLAMATION,"Please select a Helpfile.",
- "No HLP file has been selected",Res)
- Goto Wait_for_Input
- {endif}
-
- Get_Hlp_File_1a:
- Set Label$ = "WinHelp CONTEXT"
- Set Text$ = "Help file: " + HLPfile$
- Set Text$ = Text$ + "
-
- Enter the context ID integer. If you don't know
- what this is, see the help <project>.hh file."
- TextBox(Text$,Label$,Context$,Btn)
- If Btn = 2 Then Goto Wait_for_Input
-
- If Context$ <> "" Then Goto Get_Hlp_File_1b
- MessageBox(OK,1,EXCLAMATION,"Please enter a Context ID.",
- "No Context ID selected.",Res)
- Goto Get_Hlp_File_1a
-
- Get_Hlp_File_1b:
- Set CommandLine$ = "winhlp32 -n " + Context$
- Set CommandLine$ = CommandLine$ + " "
- Set CommandLine$ = CommandLine$ + HLPfile$
- Run(CommandLine$)
- Goto Wait_for_Input
-
- Get_Hlp_File_2:
- If HLPfile$ <> "" Then Goto Get_Hlp_File_2a
- MessageBox(OK,1,EXCLAMATION,"Please select a Helpfile.",
- "No HLP file has been selected",Res)
- Goto Wait_for_Input
- {endif}
-
- Get_Hlp_File_2a:
- Set Label$ = "WinHelp CONTEXT"
- Set Text$ = "Help file: " + HLPfile$
- Set Text$ = Text$ + "
-
- Enter the exact TOPIC_NAME, using '_' between words.
- If you don't know what this is, see the ROBOHELP
- <project>.hh file."
- TextBox(Text$,Label$,Context$,Btn)
- If Btn = 2 Then Goto Wait_for_Input
-
- If Context$ <> "" Then Goto Get_Hlp_File_2b
- MessageBox(OK,1,EXCLAMATION,"Please enter a TOPIC_NAME.",
- "No TOPIC_NAME selected.",Res)
- Goto Get_Hlp_File_2a
-
- Get_Hlp_File_2b:
- Set CommandLine$ = "winhlp32 -i " + Context$
- Set CommandLine$ = CommandLine$ + " "
- Set CommandLine$ = CommandLine$ + HLPfile$
- Run(CommandLine$)
- Goto Wait_for_Input
-
-
- View_MAP:
- Set Filter$ = "MAP Files(*.hh),*.hh"
- Set Caption$ = "Select the ROBOHELP(tm) map file"
- Set InitDir$ = SourceDir$
- Set InitFile$ = "*.hh"
- Set HLPfile$ = ""
- FileGet(Filter$,InitFile$,InitDir$,Caption$,CHANGEDIR,MAPfile$)
- If MAPfile$ = "" Then Goto Wait_for_Input
- Set CommandLine$ = "notepad " + MAPfile$
- Run(CommandLine$)
- Goto Wait_for_Input
-
- Concept:
- MessageBox(OK,1,INFORMATION,
- "This utility is used to test the links to context
- sensitive help topics in HLP files. You are asked
- for a HLP file, and then a context ID number or the
- actual topic. If a HLP file has not been defined,
- you cannot enter an ID number. Once you have selected
- an HLP file, you can select any context ID number or
- topic.
-
- You can also invoke NotePad to view ROBOHELP (tm)
- generated <project>.hh files.This is the list
- of '#define <context_id> <integer>' entries
- needed for the Windows application developer.
-
- If an ID number is entered, WINHELP is invoked
- by the command line
-
- 'winhlp32 -n <integer> <project>.hlp'
-
- or if a topic_name is entered, using
-
- 'winhlp32 -i <topic_name> <project>.hlp'
-
- If WINHELP cannot locate the context ID or topic,
- you will be prompted with a warning message that
- the 'Topic does not exist'.",
- "Context Sensitive Help",Res)
- Goto Wait_for_Input
-
- About:
- AboutUser("About Context","Context Sensitive Help Test Program.",
- "Copyright ⌐ (1995-96) VYSOR Integration Inc.
- Gatineau, Quebec, CANADA. All Rights Reserved.")
- Goto Wait_for_Input
-
-
-
-
-
-
-
-